<?php
class AdminBaseAction extends Action{
	function  _initialize(){
			//echo "_initialize()";
			//echo "cookie=".$_COOKIE['loginName'];
		//echo "session=".$_SESSION['loginName']; // 删除name
	//	echo "session1=".Session::get('loginName')."<br/>";
		
		$Company = M("Company");
		$com = $Company->find(1);
		//dump($comVO);return;
		$this->assign("com",$com);
		
		if(Cookie::is_set('loginName')){
			//$loginID = Cookie::get('loginID');
			//$loginName = Cookie::get('loginName');
			//echo "有cookie".$loginID.$loginName."<br/>";
			Session::set('loginID',Cookie::get('loginID'));//设置session
			Session::set('loginName', Cookie::get('loginName'));
			return;
		}
		
		
		if(Session::is_set('loginName')){

		}else{
			$this->redirect('Login/index');
		}
		return ;
	}
}
